/*
 * PointsRegister.java
 *
 * Creada el 30/01/2012, 03:21:44 PM
 *
 * Clase Java desarrollada por Edgar Ramos para 7i Software Factory el día 30/01/2012
 *
 * Para informacion sobre el uso de esta clase, asi como bugs, actualizaciones, o mejoras enviar un mail a
 * eramos@7i.com.mx
 *
 * Desarrollado por la célula de desarrollo de Zacatecas
 *
 */
package com.grupoquark.cic.model.register;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author Edgar Ramos
 * @version 1.0
 * @author-mail eramos@7i.com.mx
 * @date 30/01/2012
 */
@Entity
@Table(name = "points_register")
public class PointsRegister extends Register
{
    @Column(name = "earned_points")
    private int earnedPoints;
    @Column(name = "lost_points")
    private int lostPoints;

    protected PointsRegister()
    {
    }

    public PointsRegister(Date registrationDay, int earnedPoints, int lostPoints)
    {
        super(registrationDay);
        this.earnedPoints = earnedPoints;
        this.lostPoints = lostPoints;
    }

    public int getEarnedPoints()
    {
        return earnedPoints;
    }

    public void setEarnedPoints(int earnedPoints)
    {
        this.earnedPoints = earnedPoints;
    }

    public int getLostPoints()
    {
        return lostPoints;
    }

    public void setLostPoints(int lostPoints)
    {
        this.lostPoints = lostPoints;
    }

    @Override
    public boolean equals(Object obj)
    {
        if (obj == null)
        {
            return false;
        }
        if (getClass() != obj.getClass())
        {
            return false;
        }
        final PointsRegister other = (PointsRegister) obj;
        if (this.earnedPoints != other.earnedPoints)
        {
            return false;
        }
        if (this.lostPoints != other.lostPoints)
        {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode()
    {
        int hash = 7;
        hash = 79 * hash + this.earnedPoints;
        hash = 79 * hash + this.lostPoints;
        return hash;
    }

    @Override
    public String toString()
    {
        return "PointsRegister{" + "earnedPoints=" + earnedPoints + ", lostPoints=" + lostPoints + '}';
    }
}
